<?php foreach($getallmodule as $module) {?>

  <div class="accordion-group">
    <div class="accordion-heading">
      <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collap<?= $module->id?>">
       <span class="span2"><?= $module->name?></span>
	   <br>
       <span class="span10 muted"><?= $module->description?></span>
       <span class="span2"><input type="button" class="btn btn-info" value="Rs. <?= $module->price?>"</button></span>
       <div class="clearfix">
       <div id="posin">
       <span id="spanedit"><a href="#col<?php echo $module->id;?>"  data-toggle="modal"><i class="icon-edit"></i></a></span>
       <span id="spandelete">
	  <a  onclick="deletemodule(<?php echo $module->id;?>)";><i class="icon-remove"> </i></a> </span>
      </div>
      </div>
	  <form method="post" action="<?= site_url('user/proposal/update_module');?>">
    <div id="col<?php echo $module->id;?>" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="icon-remove"></i></button>
    <h3 id="myModalLabel"><legend> <h3>Module Name:</h3><span id="modalprice"><h4> Price:</h4>
	 <span class="add-on">$</span>
     <input class="span4" id="appendedPrependedInput" name="appendedPrependedInput" type="text" value="<?php echo $module->price;?>">
     <span class="add-on">.00</span></span></legend>
	 <textarea rows="1" id="mname" name="mname" class="ckeditor"><?php echo $module->name;?></textarea>
	 
    </div>
   <div class="modal-body" >
	<input type="hidden" id="hidden" name="hidden" value="<?php echo $module->id;?>"/>
     <div><legend><h3><span id="desmodal">Description:<h3></span></legend></div>
	 
    <div><textarea rows="5" cols="15" id="moddesc" name="moddesc"><?php echo $module->description;?> </textarea > </div>
	<script type="text/javascript">
        CKEDITOR.replace( 'moddesc' );
      </script>
	
    </div>
    <div class="modal-footer">
    <button type="button"  name="delete" class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
    <input type="submit" name="update" class="btn btn-primary" id="modalsave" value="update changes">
    </div>
    </div></form>
    <div id="collap<?= $module->id?>" class="accordion-body collapse">
      <div class="accordion-inner">
      <strong>Features</strong>
      <ul>
      <?php foreach($this->proposal_model->get_features_by_module($module->id) as $features ) { ?>
	    <span class="span2"><h4><?= $features->name?></h4></span>
		<hr>
       <span class="span8 muted"><?= $features->description?></span>
       <span class="span2"><input type="button" class="btn btn-info" value="Rs. <?= $features->price?>"></button></span>
		       <div class="clearfix">
       <div id="posin">
       <a href="#<?php echo $features->id;?>"data-toggle="modal"><i class="icon-edit"> </i></a></span>
       <span id="spandelete"><a><i class="icon-remove" onclick="deletefeature(<?php echo $features->id;?>)"; ></i></a></span>
      </a></div>
      </div>
		<form method="post" action="<?= site_url('user/proposal/update_feature');?>">
    <div id="<?php echo $features->id;?>" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="icon-remove"></i></button>
    <h3 id="myModalLabel"><legend> <h3>Feature Name:</h3></legend>
	 <textarea rows="1" id="featname" name="featname" ><p><?php echo $features->name;?></p></textarea>
	 <script type="text/javascript">
        CKEDITOR.replace( 'mname' );
      </script>
    </div>
   <div class="modal-body" >
	<input type="hidden" id="feathidden" name="feathidden" value="<?php echo $features->id;?>"/>
     <legend><h3>Description:<h3></legend> <span id="modalprice"><legend><h4> Price:</h4></legend>
	 <span class="add-on">$</span>
     <input class="span4" id="appendedPrependedInput" name="featprice" type="text" value="<?php echo $features->price;?>">
     <span class="add-on">.00</span></span>
    <p ><textarea rows="5" id="featdesc" name="featdesc"><?php echo $features->description;?> </textarea > 
	</p>
    </div>
    <div class="modal-footer">
    <button type="button"  name="delete" class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
    <input type="submit" name="featupdate" class="btn btn-primary" id="modalsave" value="update changes">
    </div>
    </div></form>
		
	 
      </ul>
      </div><?php }?>
    </div> 
  </div>
   

  
  
  
  
  
  
  
  
  
  <?php }?>
